from .celery import app


@app.task
def updateGoods():
    from goods import models
    from django.core.cache import cache

    queryset = models.Goods.objects.filter(is_delete=False, is_show=True).order_by('orders')
    cache.set('goods_list', queryset)
    print('更新缓存数据了')